package com.hades.example.java.refactoring.before.c10.c10_14_replace_error_code_with_exception;

public class Example {
    public static void main(String[] args) {
        Account account = new Account();
        int result = account.withdraw(10);
        if (result == -1) {
            handleOverdrawn();
        } else {
            doTheUsualThing();
        }
    }

    private static void handleOverdrawn() {

    }

    private static void doTheUsualThing() {
    }
}
